package com.party.admin.task;


import com.party.core.service.crowdfund.ICrowfundFollowUpService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 定时更新众筹结束跟进表的数据
 */
@Component(value = "quartzUpdateEventStatistics")
public class QuartzUpdateEventStatistics {

    Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private ICrowfundFollowUpService crowfundFollowUpService;

    /**
     * 众筹结束跟进定时更新数据
     */
    public void update() {

        try {
            int followState = 0;
            crowfundFollowUpService.initializationEventStatistics(followState);
        } catch (Exception e) {
            logger.error("重要通知的业务定时任务异常", e);
        }
    }

}
